﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RandomNumberGenerator
{
    public partial class RandomNumberGenerator : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GenerateNumberButton_Click(object sender, EventArgs e)
        {
            int rangeMin = int.Parse(this.RangeMin.Text);
            int rangeMax = int.Parse(this.RangeMax.Text);
            Random rand  = new Random();
            this.NumberField.Text = rand.Next(rangeMin, rangeMax + 1).ToString();
        }
    }
}